home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / ScreenSavers / BackSpaceViews / SpheresView.BackModule / SpheresWrap.psw < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.0 KB  |  52 lines

  1. defineps drawSphereBW(float color; int radius; 
  2.                                         float dcolor; float dx; float dy; int maxsize)
  3.     color setgray
  4.     1.0 setalpha
  5.     maxsize maxsize radius 0 360 arc
  6.     clip fill stroke
  7.     
  8.     /currX maxsize def
  9.     /currY maxsize def
  10.     /curColor color def
  11.     radius -1 0
  12.     {
  13.         /i exch def
  14.         curColor setgray
  15.         currX currY i 0 360 arc
  16.         fill
  17.         /currX currX dx add def
  18.         /currY currY dy add def
  19.         /curColor curColor dcolor add def
  20.     } for
  21.     initclip
  22. endps
  23.  
  24.  
  25. defineps drawSphereCL(float red; float green; float blue; int radius; 
  26.                                         float dred; float dgreen; float dblue; float dx; float dy;
  27.                                         int maxsize)
  28.     red green blue setrgbcolor
  29.     1.0 setalpha
  30.     maxsize maxsize radius 0 360 arc
  31.     clip fill stroke
  32.     
  33.     /currX maxsize def
  34.     /currY maxsize def
  35.     /curR red def
  36.     /curG green def
  37.     /curB blue def
  38.     radius -1 0
  39.     {
  40.         /i exch def
  41.         curR curG curB setrgbcolor
  42.         currX currY i 0 360 arc
  43.         fill
  44.         /currX currX dx add def
  45.         /currY currY dy add def
  46.         /curR curR dred add def
  47.         /curG curG dgreen add def
  48.         /curB curB dblue add def
  49.     } for
  50.     initclip
  51. endps
  52.